let offscreenCanvas
let ctx
let isDirty = false
let onmessage = (evt) => {
  switch (evt.data.type) {
    case 'init':
      offscreenCanvas = evt.data.canvas
      ctx = offscreenCanvas.getContext('2d')
  }
}

function render() {
  ctx.putData()
}
